package com.piece.blog.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

@Data
@Entity
@NoArgsConstructor
@Table(name = "blog_grep_define")
@ApiModel(value = "爬虫规则定义表:blog_grep_define")
public class BlogGrepDefine implements Serializable {

    @Id
    @Column(name = "dict_code", length = 11)
    @ApiModelProperty(value = "字典编码")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long dictCode;

    @Column(name = "dict_sort", length = 4)
    @ApiModelProperty(value = "字典排序")
    private Long dictSort;

    @Column(name = "dict_label", length = 30)
    @ApiModelProperty(value = "字典标签")
    private String dictLabel;

    @Column(name = "dict_value", length = 50)
    @ApiModelProperty(value = "字典键值")
    private String dictValue;

    @Column(name = "dict_type", length = 2)
    @ApiModelProperty(value = "字典类型", notes = "00=组, 01=选项")
    private String dictType;

    @Column(name = "dict_group", length = 500)
    @ApiModelProperty(value = "字典组名")
    private String dictGroup;

    @Column(name = "ancestors", length = 50)
    @ApiModelProperty(value = "祖级列表")
    private String ancestors;

    @Column(name = "parent_code", length = 11)
    @ApiModelProperty(value = "父节点CODE")
    private Long parentCode;

    @Column(name = "is_leaf", length = 1)
    @ApiModelProperty(value = "是否叶子节点", notes = "Y=是, N=否")
    private String isLeaf;
}
